<?php include $this->getViewFile('/common/Head') ?>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
  <?php include $this->getViewFile('/common/Nav') ?>
  <div class="h_a">查找</div>
  <form method="post" action="" id="searchForm">
    <div class="search_type cc mb10">
       <div class="mb10">
        关键字：<?php echo Form::select(array('title'=>'标题'),$sType,'name="type"') ?>
        <input type="text" class="input length_2" name="keyword" style="width:200px;" value="<?php echo $keyword?>" placeholder="请输入搜索内容...">
        <button class="btn">搜索</button>
      </div>
    </div>
  </form>
  <div class="mb10"> 共有 ( <b><?php echo $count; ?></b> ) 篇文章</div>
  <form name="myform" action="<?php echo AdminBase::U("delete") ?>" method="post" class="J_ajaxForm">
    <div class="table_list">
      <table width="100%" cellspacing="0">
        <thead>
          <tr>
            <td width="50"><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x">全选</td>
            <td align="center">标题</td>
            <td align="center" width="120">添加时间</td>
            <td align="center" width="100">操作</td>
          </tr>
        </thead>
        <tbody>
          <?php
		  foreach($data as $rs){
		  ?>
          <tr>
            <td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="<?php echo $rs->id; ?>" id="att_<?php echo $rs->id; ?>"><?php echo $rs->id; ?></td>
            <td>[<?php echo ContentCategoryModel::model()->getCatname($rs['catid'])?>]<a href="<?php echo AdminBase::U('front/article/article',array('id'=>$rs['id'])) ?>" target="_blank"><?php echo $rs['title'] ?></a></td>
            <td align="center" width="100"><?php echo date('Y-m-d H:i:s',$rs['createtime']) ?></td>
            <td align="center" width="100">
            <?php
			$op = array();
			if(RBAC::authenticate('edit')){
				$op[] = '<a class="J_ajax_edit" href="'.AdminBase::U("edit",array('id'=>$rs->id)).'">编辑</a>';
			}
			if(RBAC::authenticate('delete')){
				$op[] = '<a class="J_ajax_del" href="'.AdminBase::U("delete",array('id'=>$rs->id)).'">删除</a>';
			}
			echo implode(' | ',$op);
			?>
            </td>
          </tr>
          <?php
		  }
		  ?>
        </tbody>
      </table>
      <div class="p10">
        <div class="pages"><?php echo $Page;?></div>
      </div>
    </div>
  </form>
</div>
<script src="<?php echo $staticUrl; ?>statics/js/common.js"></script>
</body>
</html>